﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace QWeiBoN.Util
{
    /// <summary>
    /// 微博内容帮助类
    /// </summary>
    public class StatusContentHelper
    {
        /// <summary>
        /// 保存内容
        /// </summary>
        /// <param name="content">要保存的内容</param>
        public void Save(string content)
        {
            IsoSetting.Set(IsoHelper.StatusDraftKey, content);
        }

        /// <summary>
        /// 获取微博草稿内容
        /// </summary>
        /// <returns></returns>
        public string Get()
        {
            var tmpStr = IsoSetting.Get(IsoHelper.StatusDraftKey);
            if (null != tmpStr)
            {
                return tmpStr.ToString();
            }
            return string.Empty;
        }

        /// <summary>
        /// 清除微博草稿
        /// </summary>
        public void Clear()
        {
            IsoSetting.Set(IsoHelper.StatusDraftKey, string.Empty);
        }
    }
}
